package com.wlxt.springcloud.book.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(name = "member-service", fallback = MemberServiceClient.MemberServiceClientFallBack.class)
@FeignClient(name = "member-service", fallback = MemberServiceClientFallBack.class)
public interface MemberServiceClient {

	@GetMapping("/check")
	public MemberResultDTO checkMobile(@RequestParam("mobile")String mobile);
	
//	@Component
//	class MemberServiceClientFallBack implements MemberServiceClient {
//
//		@Override
//		public MemberResultDTO checkMobile(String mobile) {
//			MemberResultDTO mr = new MemberResultDTO();
//			mr.setCode("0");
//			mr.setMessage("success");
//			return mr;
//		}
//		
//	}
	
}
